//
//  XHRLoginRegisterView.m
//  BuDeJie
//
//  Created by haoran on 16/4/6.
//  Copyright © 2016年 xuhaoran. All rights reserved.
//

#import "XHRLoginRegisterView.h"

@interface XHRLoginRegisterView ()

@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@end

@implementation XHRLoginRegisterView

+(instancetype)loginView{

    return [[[NSBundle mainBundle]loadNibNamed:@"XHRLoginRegisterView" owner:nil options:nil]firstObject];

}

+(instancetype)registerView{
    
    return [[[NSBundle mainBundle]loadNibNamed:@"XHRLoginRegisterView" owner:nil options:nil]lastObject];
    
}



// 从xib加载就会调用,就会把xib所有的属性全部设置
-(void)awakeFromNib{
    UIImage *image = self.loginBtn.currentBackgroundImage;
    image = [image stretchableImageWithLeftCapWidth:image.size.width *0.5 topCapHeight:image.size.height * 0.5 ];
    [self.loginBtn setBackgroundImage:image forState:UIControlStateNormal];

}



@end
